﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmartMD.DataAccess.Oracle;
using SmartMD.DataAccess.Interface.Dao;
using SmartMD.DataAccess.Oracle.DaoImpl;
using SmartMD.DataModel.Entity;

namespace SmartMD.DataAccess.Service
{
    public class DataServiceManager
    {
        private static ICommonQuery _commonQuery;
        private static IExamItemDao examItemService = null;
        private static IIndiceDefineDao indiceDefineSevice = null;
        private static IExamItemValueDao itemValueService = null;
        private static PatientInfoDaoImpl patientInfoService = null;
        private static SpecimensDaoImpl specimensService = null;
        private static SpecRecordDaoImpl specRecordService = null;
        private static BaseGenericDaoImpl baseService = null;
        private static DictionaryItemDaoImpl dictItemService = null;
        private static DataDictDaoImpl dataDictService = null;
        private static ContainerModelDaoImpl containerModelService = null;
        private static ImageDaoImpl imageService = null;
        private static UserEntityDao userService = null;
        private static SysInfoDao sysInfoService = null;
        private static ContainerDaoImpl containerService = null;
        private static FollowupInfoDao followupInfoService = null;

        public static FollowupInfoDao FollowupInfoService
        {
            get
            {
                if (followupInfoService == null)
                    followupInfoService = new FollowupInfoDao();
                return followupInfoService;
            }
        }


        public static ContainerDaoImpl ContainerService
        {
            get
            {
                if (containerService == null)
                    containerService = new ContainerDaoImpl();
                return containerService;
            }
        }

        public static SysInfoDao SysInfoService
        {
            get
            {
                if (sysInfoService == null)
                    sysInfoService = new SysInfoDao();
                return sysInfoService;
            }
        }

        public static UserEntityDao UserService
        {
            get
            {
                if (userService == null)
                    userService = new UserEntityDao();
                return userService;
            }
        }

        public static ImageDaoImpl ImageService
        {
            get
            {
                if (imageService == null)
                    imageService = new ImageDaoImpl();
                return imageService;
            }
        }

        public static ICommonQuery CommonQuery
        {
            get
            {
                if (_commonQuery == null)
                    _commonQuery = new CommonQueryImpl();
                return _commonQuery;
            }
        }
        public static IExamItemDao ExamItemService
        {
            get
            {
                examItemService = examItemService ?? new ExamItemDaoImpl();
                return examItemService;
            }
        }
        public static IIndiceDefineDao IndiceDefineSevice
        {
            get
            {
                indiceDefineSevice = indiceDefineSevice ?? new IndiceDefineDaoImpl();
                return indiceDefineSevice;
            }
        }
     
        public static IExamItemValueDao ItemValueService
        {
            get
            {
                itemValueService = itemValueService ?? new ExamItemValueDaoImpl();
                return itemValueService;
            }
        }

        public static PatientInfoDaoImpl PatientInfoService
        {
            get
            {
                patientInfoService = patientInfoService ?? new PatientInfoDaoImpl();
                return patientInfoService;
            }
        }
        public static SpecimensDaoImpl SpecimensService
        {
            get
            {
                specimensService = specimensService ?? new SpecimensDaoImpl();
                return specimensService;
            }
        }
        public static SpecRecordDaoImpl SpecRecordService
        {
            get
            {
                specRecordService = specRecordService ?? new SpecRecordDaoImpl();
                return specRecordService;
            }
        }
        public static BaseGenericDaoImpl BaseService
        {
            get
            {
                baseService = baseService ?? new BaseGenericDaoImpl();
                return baseService;
            }
        }

        public static DictionaryItemDaoImpl DictItemService
        {
            get
            {
                dictItemService = dictItemService ?? new DictionaryItemDaoImpl();
                return dictItemService;
            }
        }
        public static DataDictDaoImpl DataDictService
        {
            get
            {
                if (dataDictService == null)
                    dataDictService = new DataDictDaoImpl();
                return dataDictService;
            }
        }
        public static ContainerModelDaoImpl ContainerModelService
        {
            get
            {
                if (containerModelService == null)
                    containerModelService = new ContainerModelDaoImpl();
                return containerModelService;
            }
        }
        
    }
   
}
